package com.travel.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;

import java.sql.Date;


/**
 * Author:Jasenon_ce
 * Date: 2025.04.19/下午3:04
 */
@TableName(value = "forum_article", autoResultMap = true)
@Setter
public class UserArticle {

//    private final DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
//
//    private final TimeZone timeZone = TimeZone.getTimeZone("Asia/Shanghai");

    @TableId(type = IdType.AUTO)
    private Integer id;

    // 用于获取用户信息  name,avater
    private Long userId;

    private String title;

    // 富文本信息
    @Getter
    private String richContent;

    // 点赞数
    @Getter
    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    private Integer likeCount;

    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    private final Date createTime = new Date(System.currentTimeMillis());

    private Integer commentCount;

    private Integer category;

    // 是否置顶
    private boolean isTop;



}
